# Maintainer: Florian Pritz <bluewind@xinu.at>

pkgname=cpanminus
pkgver=1.7046
pkgrel=2
pkgdesc='get, unpack, build and install modules from CPAN'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.8.1')
provides=("perl-app-cpanminus=$pkgver")
url=https://metacpan.org/release/App-cpanminus
source=("https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-$pkgver.tar.gz")
md5sums=(c6630373e444ed1e6b772e50e526a333)
sha512sums=(ced5f264979eb50cc33ac566c0242998c9b9c158ba435b9a180810f58eaa0b28d0de70312ade10df0ee3808369423f7baa029f2be740461d20a695e5e24d0d9b)
_ddir="App-cpanminus-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
